package com.cqut.service;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import com.cqut.dto.DownloadFileDTO;
import com.cqut.model.FileManager;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

public interface IFileManagerService {
    boolean save(FileManager fileManager);

    boolean update(FileManager fileManager);

    boolean delete(String fileId);

    boolean batchDelete(String[] primaryKeys);

    FileManager findModel(String fileId);

    FileManager findModel(String fileId, String[] parameters);

    Map<String, Object> findMap(String fileId);

    Map<String, Object> findMap(String fileId, String[][] parameters);

    List<FileManager> loadModels();

    List<FileManager> loadModels(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<FileManager> loadModels(String[] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps();

    List<Map<String, Object>> loadMaps(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps(String[][] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    long count();

    long count(String condition, Object[] values);

    long count(String[] parameters, boolean isDistinct);

    long count(String[] parameters, String condition, Object[] values, boolean isDistinct);

    Map<String, Object> uploadFile(CommonsMultipartFile file);

    DownloadFileDTO downloadFile(String fileId);
}
